package com.gxa.service.impl;

import com.gxa.mapper.PermissionMapper;
import com.gxa.pojo.Permission;
import com.gxa.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    PermissionMapper permissionMapper;


    @Override
    public List<Permission> findPermissionByUserName(String map) {
        return permissionMapper.findPermissionByUserName(map);
    }

    @Override
    public List<Permission> findAllPermission() {
        return permissionMapper.findAllPermission();
    }

    @Override
    public Integer deleteRolePermission(Integer id) {
        return permissionMapper.deleteRolePermission(id);
    }

    @Override
    public Integer insertRolePermission(List<Map> map) {
        return permissionMapper.insertRolePermission(map);
    }

    @Override
    public Integer findPermissionByUserName1(String userName) {
        return permissionMapper.findPermissionByUserName1(userName);
    }
}